<!DOCTYPE html>
<html th:lang="${language}" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
  <th:block th:include="include :: header(#{okr.my})" />
  <th:block th:include="include :: okr-css" />
</head>
<body class="gray-bg">
<div class="container-div">
  <div class="row" >
    <div class="col-sm-12 select-table table-striped">
      <table id="bootstrap-table"></table>
    </div>
  </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
  var prefix = ctx + "dataKanban";
  $(function(){
    var options = {
      url: prefix + "/queryOkrScoreList",
      showColumns: false,
      showRefresh: false,
      onDblClickRow: onDbClick,
      showSearch: false,
      columns: [
        {
          field: 'userId',
          visible: false
        },
        {
          field: 'userName',
          title: [[#{okr.userName}]]
        },
        {
          field: 'scoreCount',
          title: [[#{okr.scoreCount}]]
        }
      ]
    }
    $.table.init(options)
  })

  function onDbClick(row, $element){
    $.ajax({
      url: prefix + '/getCid',
      type: 'POST',
      success: function(data){
        $.modal.openTab(row.userName + "的OKR列表",ctx + "okr/info/viewUserOkrList/"+ row.userId+"/"+data);  }
    })
  }


</script>
</body>
</html>